function [ gp ] = g_function_p( g )

global G_FUNCTION;
global BETA;
%G_FUNCTION_P Summary of this function goes here
%   Detailed explanation goes here

if G_FUNCTION == 2  % Funcion no lineal tanh
    gp = BETA*(1-g.*g);            
elseif G_FUNCTION == 3        % Funcion no lineal exp
    gp = 2 * BETA * (g .* (1-g));
else                % Funcion lineal
    gp = BETA;
end

end

